<?php
/* @var $this BitacoraController */
/* @var $model Bitacora */

$this->breadcrumbs=array(
	'Bitácora'=>array('index'),
	'Administrador',
);

$this->menu=array(
	array('label'=>'Generar PDF', 'url'=>array('pdf')),		
	array('label'=>'Generar Excel', 'url'=>array('excel')),
	array('label'=>'Respaldo de datos', 'url'=>array('backup')),


);

Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$('#bitacora-grid').yiiGridView('update', {
		data: $(this).serialize()
	});
	return false;
});
");
?>

<h1>Administrador de Bitácora</h1>


<?php echo CHtml::link('Busqueda Avanzada','#',array('class'=>'search-button')); ?>
<div class="search-form" style="display:none">
<?php $this->renderPartial('_search',array(
	'model'=>$model,
)); ?>
</div><!-- search-form -->

<?php $this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'bitacora-grid',
	'dataProvider'=>$model->search(),
	'filter'=>$model,
	'columns'=>array(
		'IDUSUARIO',
		'Accion',
		'Descripcion',
		'Fecha',
	),
	'pager'=>array(
    'maxButtonCount'=>5,
    'pageSize'=> Yii::app()->params['listPerPage'],

    ),
)); ?>
